mod response;
pub use response::*;

use axum::{routing::get, Router};

pub fn gen_routes() -> Router {
    Router::new()
        .route("/", get(api_root_handler).post(api_root_json))
        .route(
            "/users",
            get(get_users)
                .post(create_users)
                .put(update_users)
                .delete(delete_users),
        )
}

async fn api_root_handler() -> String {
    "Get api root success.".to_string()
}

async fn api_root_json() -> DefaultRes {
    ApiResponse::json()
}
async fn get_users() -> DefaultRes {
    ApiResponse::json()
}
async fn create_users() -> DefaultRes {
    ApiResponse::json()
}
async fn update_users() -> DefaultRes {
    ApiResponse::json()
}
async fn delete_users() -> DefaultRes {
    ApiResponse::json()
}
